import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

/* Layout */
import Layout from '@/layout'
export const constantRoutes = [{
  path: '/login',
  component: resolve => require(['@/views/login/index'], resolve),
  meta: { isNo: true },
  hidden: true
},
{
  path: '/404',
  component: resolve => require(['@/views/404'], resolve),
  meta: { isNo: true },
  hidden: true
},

{
  path: '/',
  redirect: '/login',
  meta: { isNo: true },
  hidden: true
},
{
  path: '/index/index',
  component: Layout,
  redirect: '/index',
  meta: {
    title: '首页',
    icon: 'el-icon-s-home'
  },
  children: [{
    path: '/index',
    name: 'index',
    component: resolve => require(['@/views/index/index'], resolve),
    meta: {
      activeMenu: '/index',
      title: '首页',
    }
  }]
},
{//banner管理
  path: '/banner/banner',
  component: Layout,
  redirect: '/banner',
  meta: {
    title: 'banner管理',
    icon: 'el-icon-picture'
  },
  children: [{
    path: '/banner',
    name: 'banner',
    component: resolve => require(['@/views/banner/banner'], resolve),
    meta: {
      activeMenu: '/banner',
      title: 'banner管理',
    }
  }]
},
{
  path: "/order/order",
  component: Layout,
  redirect: "/order",
  meta: {
    title: "订单管理",
    icon: "el-icon-s-claim"
  },
  children: [
    {
      path: "/make",
      name: "make",
      component: resolve => require(["@/views/make/make"], resolve),
      meta: {
        activeMenu: "/make",
        title: "预约列表"
      },
      children: [
        {
          hidden: true,
          path: "/makeInfo",
          name: "makeInfo",
          component: resolve => require(["@/views/make/makeInfo"], resolve),
          meta: {
            title: "预约详情",
            activeMenu: "/make"
          }
        },
        {
          hidden: true,
          path: "/billing",
          name: "billing",
          component: resolve => require(["@/views/make/billing"], resolve),
          meta: {
            title: "开单",
            activeMenu: "/make"
          }
        }
      ]
    },
    {
      path: "/order",
      name: "order",
      component: resolve => require(["@/views/order/order"], resolve),
      meta: {
        activeMenu: "/order",
        title: "订单列表"
      },
      children: [
        {
          hidden: true,
          path: "/orderInfo",
          name: "orderInfo",
          component: resolve => require(["@/views/order/orderInfo"], resolve),
          meta: {
            title: "订单详情",
            activeMenu: "/order"
          }
        }
      ]
    }, {
      path: "/orderAccom",
      name: "orderAccom",
      component: resolve => require(["@/views/order/orderAccom"], resolve),
      meta: {
        activeMenu: "/orderAccom",
        title: "已完成订单"
      },
      children: [
        {
          hidden: true,
          path: "/finishOrderInfo",
          name: "finishOrderInfo",
          component: resolve => require(["@/views/order/orderInfo"], resolve),
          meta: {
            title: "订单详情",
            activeMenu: "/orderAccom"
          }
        },
        {
          hidden: true,
          path: "/makeInvoice",
          name: "makeInvoice",
          component: resolve => require(["@/views/order/makeInvoice"], resolve),
          meta: {
            title: "申请发票",
            activeMenu: "/orderAccom"
          }
        }
      ]
    }, {
      path: "/cancelOrder",
      name: "cancelOrder",
      component: resolve => require(["@/views/order/cancelOrder"], resolve),
      meta: {
        activeMenu: "/cancelOrder",
        title: "已作废订单"
      }
    },
  ]
},
{
  path: '/personalAdmin',
  component: Layout,
  redirect: '/personalAdmin/personalList',
  name: 'personalList',
  meta: {
    title: '人事管理',
    icon: 'el-icon-s-custom'
  },
  children: [
    {
      path: 'personalList',
      name: 'personalList',
      component: resolve => require(['@/views/personalAdmin/personalList'], resolve),
      meta: {
        title: '员工管理',
        activeMenu: '/personalAdmin/personalList',
      },
      children: [
        {
          hidden: true,
          path: 'editPersonal',
          name: 'editPersonal',
          component: resolve => require(['@/views/personalAdmin/editPersonal'], resolve),
          meta: {
            title: '',
            activeMenu: '/personalAdmin/personalList'
          }
        }, {
          hidden: true,
          path: '/staffbution',
          name: 'staff',
          component: () => import('@/views/accountManagement/rootDdistribution'),
          meta: {
            title: '权限分配',
            activeMenu: '/personalAdmin/personalList'
          }
        }
      ],
    },
    {
      path: 'personalChanges',
      name: 'personalChanges',
      component: resolve => require(['@/views/personalAdmin/personalChanges'], resolve),
      meta: {
        title: '人员异动',
        activeMenu: '/personalAdmin/personalChanges',
      },
      children: [
        {
          hidden: true,
          path: 'editPersonalChanges',
          name: 'editPersonalChanges',
          component: resolve => require(['@/views/personalAdmin/editPersonalChanges'], resolve),
          meta: {
            title: '',
            activeMenu: '/personalAdmin/personalChanges'
          }
        },
      ],
    },
    {
      path: 'postManagement',
      name: 'postManagement',
      component: resolve => require(['@/views/personalAdmin/postManagement'], resolve),
      meta: {
        title: '岗位管理',
        activeMenu: '/personalAdmin/postManagement',
      },
    },
    {
      path: 'rewardRanking',
      name: 'rewardRanking',
      component: resolve => require(['@/views/personalAdmin/rewardRanking'], resolve),
      meta: {
        title: '打赏排行',
        activeMenu: '/personalAdmin/rewardRanking',
      },
      children: [
        {
          hidden: true,
          path: 'exceptional',
          name: 'exceptional',
          component: resolve => require(['@/views/personalAdmin/exceptional'], resolve),
          meta: {
            title: '打赏列表',
            activeMenu: '/personalAdmin/rewardRanking'
          }
        },
      ],
    },
    {
      path: 'exceptional',
      name: 'exceptional',
      component: resolve => require(['@/views/personalAdmin/exceptional'], resolve),
      meta: {
        title: '打赏列表',
        activeMenu: '/personalAdmin/exceptional'
      }
    },
    {
      path: 'shiftManagement',
      name: 'shiftManagement',
      component: resolve => require(['@/views/personalAdmin/shiftManagement'], resolve),
      meta: {
        title: '员工排班',
        activeMenu: '/personalAdmin/shiftManagement',
      },
    },
    {
      path: 'changeShift',
      name: 'changeShift',
      component: resolve => require(['@/views/personalAdmin/changeShift'], resolve),
      meta: {
        title: '员工调班',
        activeMenu: '/personalAdmin/changeShift',
      },
    },
    {
      hidden: true,//废弃
      path: 'reissue',
      name: 'reissue',
      component: resolve => require(['@/views/personalAdmin/reissue'], resolve),
      meta: {
        title: '补卡列表',
        activeMenu: '/personalAdmin/reissue',
      },
    },
    {
      hidden: true,//废弃
      path: 'statistics',
      name: 'statistics',
      component: resolve => require(['@/views/personalAdmin/statistics'], resolve),
      meta: {
        title: '考勤统计',
        activeMenu: '/personalAdmin/statistics',
      },
    },
    {//新考勤统计
      path: 'newStatistics',
      name: 'newStatistics',
      component: resolve => require(['@/views/personalAdmin/newStatistics'], resolve),
      meta: {
        title: '考勤统计',
        activeMenu: '/personalAdmin/newStatistics',
      },
    },
    {//新请假
      path: 'newLeave',
      name: 'newLeave',
      component: resolve => require(['@/views/personalAdmin/newLeave'], resolve),
      meta: {
        title: '请假列表',
        activeMenu: '/personalAdmin/newLeave',
      },
    },
    {
      hidden: true,//废弃
      path: 'leaveApprover',
      name: 'leaveApprover',
      component: resolve => require(['@/views/personalAdmin/leaveApprover'], resolve),
      meta: {
        title: '请假审批流',
        activeMenu: '/personalAdmin/leaveApprover',
      },
    },
    {
      hidden: true,
      path: 'AttendanceList',
      name: 'AttendanceList',
      component: resolve => require(['@/views/personalAdmin/AttendanceList'], resolve),
      meta: {
        title: '请假列表',
        activeMenu: '/personalAdmin/AttendanceList',
      },
      children: [
        {
          hidden: true,
          path: 'AttendanceDetails',
          name: 'AttendanceDetails',
          component: resolve => require(['@/views/personalAdmin/AttendanceDetails'], resolve),
          meta: {
            title: '请假详情',
            activeMenu: '/personalAdmin/AttendanceList'
          }
        },
      ],
    },
    {
      path: 'feedback',
      name: 'feedback',
      component: resolve => require(['@/views/personalAdmin/feedback'], resolve),
      meta: {
        title: '员工反馈',
        activeMenu: '/personalAdmin/feedback',
      },
      children: [
        {
          hidden: true,
          path: 'reply',
          name: 'reply',
          component: resolve => require(['@/views/personalAdmin/reply'], resolve),
          meta: {
            title: '投诉信息',
            activeMenu: '/personalAdmin/feedback'
          }
        },
      ],
    },
  ]
},

{
  path: '/technician/technician',
  component: Layout,
  redirect: '/technician',
  name: 'projectList',
  meta: {
    title: '技师排钟管理',
    icon: 'icon-tech'
  },
  children: [
    {
      path: '/technicianList',
      name: 'technicianList',
      component: resolve => require(['@/views/technician/technicianList'], resolve),
      meta: {
        title: '技师上钟状态',
        activeMenu: '/technicianList',
      },
    },
    {
      path: '/technician',
      name: 'technician',
      component: resolve => require(['@/views/technician/technician'], resolve),
      meta: {
        title: '技师上钟排序',
        activeMenu: '/technician',
      },
    }, {
      path: '/technicianHistory',
      name: 'technicianHistory',
      component: resolve => require(['@/views/technician/technicianHistory'], resolve),
      meta: {
        title: '技师历史排序',
        activeMenu: '/technicianHistory',
      },
    },
  ],
},

{
  path: '/projectAdmin',
  component: Layout,
  redirect: '/projectAdmin/projectList',
  name: 'projectList',
  meta: {
    title: '项目管理',
    icon: 'el-icon-menu'
  },
  children: [
    {
      path: 'projectList',
      name: 'projectList',
      component: resolve => require(['@/views/projectAdmin/projectList'], resolve),
      meta: {
        title: '项目列表',
        activeMenu: '/projectAdmin/projectList',
      },
      children: [
        {
          hidden: true,
          path: 'editProject',
          name: 'editProject',
          component: resolve => require(['@/views/projectAdmin/editProject'], resolve),
          meta: {
            title: '',
            activeMenu: '/projectAdmin/personalList'
          }
        },
      ],
    },
  ],
  children: [
    {
      path: 'projectList',
      name: 'projectList',
      component: resolve => require(['@/views/projectAdmin/projectList'], resolve),
      meta: {
        title: '项目列表',
        activeMenu: '/projectAdmin/projectList',
      },
      children: [
        {
          hidden: true,
          path: 'editProject',
          name: 'editProject',
          component: resolve => require(['@/views/projectAdmin/editProject'], resolve),
          meta: {
            title: '',
            activeMenu: '/projectAdmin/projectList'
          }
        },
      ],
    },
    {
      path: 'classifyList',
      name: 'classifyList',
      component: resolve => require(['@/views/projectAdmin/classifyList'], resolve),
      meta: {
        title: '项目分类列表',
        activeMenu: '/projectAdmin/classifyList',
      },
      children: [
        {
          hidden: true,
          path: 'editcassify',
          name: 'editcassify',
          component: resolve => require(['@/views/projectAdmin/editcassify'], resolve),
          meta: {
            title: '',
            activeMenu: '/projectAdmin/classifyList'
          }
        },
      ],
    },
    {
      path: 'evaluate',
      name: 'evaluate',
      component: resolve => require(['@/views/projectAdmin/evaluate'], resolve),
      meta: {
        title: '项目评价',
        activeMenu: '/projectAdmin/evaluate',
      },
      children: [
        {
          hidden: true,
          path: 'AddEvaluate',
          name: 'AddEvaluate',
          component: resolve => require(['@/views/projectAdmin/AddEvaluate'], resolve),
          meta: {
            title: '评价详情',
            activeMenu: '/projectAdmin/evaluate',
          }
        },
      ],
    },
  ]
},

{
  path: '/goods/goods',
  component: Layout,
  redirect: '/goods',
  meta: {
    title: '商品管理',
    icon: 'el-icon-s-goods'
  },
  children: [{
    path: '/goods',
    name: 'goods',
    component: resolve => require(['@/views/goods/goods'], resolve),
    meta: {
      activeMenu: '/goods',
      title: '门店商品列表',
    },
    children: [
      {
        hidden: true,
        path: "/goodsInfo",
        name: "goodsInfo",
        component: resolve => require(["@/views/goods/goodsInfo"], resolve),
        meta: {
          title: "详情",
          activeMenu: "/goods"
        }
      }
    ]
  }, {
    path: '/hqGoods',
    name: 'hqGoods',
    component: resolve => require(['@/views/goods/hqGoods'], resolve),
    meta: {
      activeMenu: '/hqGoods',
      title: '总部商品库',
    },
    children: [
      {
        hidden: true,
        path: "/zogoodsInfo",
        name: "zogoodsInfo",
        component: resolve => require(["@/views/goods/goodsInfo"], resolve),
        meta: {
          title: "详情",
          activeMenu: "/hqGoods"
        }
      }
    ]
  }, {
    path: '/goodsOrder',
    name: 'goodsOrder',
    component: resolve => require(['@/views/goods/goodsOrder'], resolve),
    meta: {
      activeMenu: '/goodsOrder',
      title: '商品订单列表',
    },
    children: [
      {
        hidden: true,
        path: "/goodsOrderInfo",
        name: "goodsOrderInfo",
        component: resolve => require(["@/views/goods/goodsOrderInfo"], resolve),
        meta: {
          title: "订单详情",
          activeMenu: "/goodsOrder"
        }
      },
      {
        hidden: true,
        path: "/makeGoodsInvoice",
        name: "makeGoodsInvoice",
        component: resolve => require(["@/views/goods/makeInvoice"], resolve),
        meta: {
          title: "申请开票",
          activeMenu: "/goodsOrder"
        }
      }
    ]
  }, {
    path: '/appraise',
    name: 'appraise',
    component: resolve => require(['@/views/goods/appraise'], resolve),
    meta: {
      activeMenu: '/appraise',
      title: '商品评价列表',
    },
    children: [
      {
        hidden: true,
        path: "/appraiseInfo",
        name: "appraiseInfo",
        component: resolve => require(["@/views/goods/appraiseInfo"], resolve),
        meta: {
          title: "评价详情",
          activeMenu: "/appraise"
        }
      }
    ]
  }, {
    path: '/storage',
    name: 'storage',
    component: resolve => require(['@/views/goods/storage'], resolve),
    meta: {
      activeMenu: '/storage',
      title: '商品入库列表',
    },
    children: [
      {
        hidden: true,
        path: "/storageInfo",
        name: "storageInfo",
        component: resolve => require(["@/views/goods/storageInfo"], resolve),
        meta: {
          title: "入库详情",
          activeMenu: "/storage"
        }
      }
    ]
  }, {
    path: '/comeStorage',
    name: 'comeStorage',
    component: resolve => require(['@/views/goods/comeStorage'], resolve),
    meta: {
      activeMenu: '/comeStorage',
      title: '商品出库管理',
    },
    children: [
      {
        hidden: true,
        path: "/comeStorageInfo",
        name: "comeStorageInfo",
        component: resolve => require(["@/views/goods/comeStorageInfo"], resolve),
        meta: {
          title: "出库详情",
          activeMenu: "/comeStorage"
        }
      }
    ]
  }, {
    path: '/goodsType',
    name: 'goodsType',
    component: resolve => require(['@/views/goods/goodsType'], resolve),
    meta: {
      activeMenu: '/goodsType',
      title: '商品分类管理',
    }
  }]
},
{
  path: '/freight/freight',
  component: Layout,
  redirect: '/freight',
  meta: {
    title: '运费管理',
    icon: 'icon-yunfei'
  },
  children: [{
    path: '/freight',
    name: 'freight',
    component: resolve => require(['@/views/freight/freight'], resolve),
    meta: {
      activeMenu: '/freight',
      title: '运费管理',
    }
  }]
},
{
  path: '/fastreply/fastreply',
  component: Layout,
  redirect: '/fastreply',
  meta: {
    title: '快捷回复管理',
    icon: 'icon-huahanAPP-icon--'
  },
  children: [{
    path: '/fastreply',
    name: 'fastreply',
    component: resolve => require(['@/views/fastreply/fastreply'], resolve),
    meta: {
      activeMenu: '/fastreply',
      title: '快捷回复管理',
    }
  }]
},
{
  path: '/financialManagement/storeSummary',
  component: Layout,
  redirect: '/storeSummary',
  meta: {
    title: '财务管理',
    icon: 'icon-caiwuguanli'
  },
  children: [
    {
      path: "/storeSummary/storeSummary",
      redirect: "/storeSummary",
      component: resolve => require(['@/views/financialManagement/index'], resolve),
      meta: {
        activeMenu: "/commissionindex",
        title: "业绩管理"
      },
      children: [{
        path: '/storeSummary',
        name: 'storeSummary',
        component: resolve => require(['@/views/financialManagement/storeSummary'], resolve),
        meta: {
          activeMenu: '/storeSummary',
          title: '门店业绩汇总表',
        }
      },
      {
        path: '/storeItem',
        name: 'storeItem',
        component: resolve => require(['@/views/financialManagement/storeItem'], resolve),
        meta: {
          activeMenu: '/storeItem',
          title: '门店项目业绩汇总表',
        }
      },
      {
        path: '/storeMarket',
        name: 'storeMarket',
        component: resolve => require(['@/views/financialManagement/storeMarket'], resolve),
        meta: {
          activeMenu: '/storeMarket',
          title: '门店产品销售业绩',
        }
      }, {
        path: '/receptionSurface',
        name: 'receptionSurface',
        component: resolve => require(['@/views/financialManagement/receptionSurface'], resolve),
        meta: {
          activeMenu: '/receptionSurface',
          title: '前台业绩汇总',
        }
      },
      {
        path: '/receptionSurfaceDetails',
        name: 'receptionSurfaceDetails',
        component: resolve => require(['@/views/financialManagement/receptionSurfaceDetails'], resolve),
        meta: {
          activeMenu: '/receptionSurfaceDetails',
          title: '前台业绩明细表',
        }
      },
      {
        path: '/technicianSurface',
        name: 'technicianSurface',
        component: resolve => require(['@/views/financialManagement/technicianSurface'], resolve),
        meta: {
          activeMenu: '/technicianSurface',
          title: '技师业绩汇总',
        },
        children: [
          {
            hidden: true,
            path: "/technicianSurfaceDetails",
            name: "technicianSurfaceDetails",
            component: resolve => require(["@/views/financialManagement/technicianSurfaceDetails"], resolve),
            meta: {
              title: "技师业绩明细表",
              activeMenu: "/technicianSurface"
            }
          },

        ]
      },]
    },
    {
      path: "/rewardStatistics/rewardStatistics",
      redirect: "/rewardStatistics",
      component: resolve => require(['@/views/financialManagement/index'], resolve),
      meta: {
        activeMenu: "/rewardStatistics",
        title: "提成管理"
      },
      children: [

        // {
        // 	path: '/receptionist',
        // 	name: 'receptionist',
        // 	component:resolve=>require(['@/views/financialManagement/receptionist'],resolve),
        // 	meta: {
        // 		activeMenu: '/receptionist',
        // 		title: '前台提成配置',
        // 	}
        // },
        // {
        // 	path: '/techniciansCommission',
        // 	name: 'techniciansCommission',
        // 	component:resolve=>require(['@/views/financialManagement/techniciansCommission'],resolve),
        // 	meta: {
        // 		activeMenu: '/techniciansCommission',
        // 		title: '技师提成配置',
        // 	},
        // 	children: [
        // 		{
        // 			hidden: true,
        // 			path: "/techniciansCommissionDetails",
        // 			name: "techniciansCommissionDetails",
        // 			component: resolve => require(["@/views/financialManagement/techniciansCommissionDetails"], resolve),
        // 			meta: {
        // 				title: "技师业绩明细表",
        // 				activeMenu: "/techniciansCommission"
        // 			}
        // 		},

        // 	]
        // },
        // {
        // 	path: '/rewardStatistics',
        // 	name: 'rewardStatistics',
        // 	component:resolve=>require(['@/views/financialManagement/rewardStatistics'],resolve),
        // 	meta: {
        // 		activeMenu: '/rewardStatistics',
        // 		title: '点钟奖励设置',
        // 	}
        // },
        {
          path: '/techAward',
          name: 'techAward',
          component: resolve => require(['@/views/financialManagement/techAward'], resolve),
          meta: {
            activeMenu: '/techAward',
            title: '技师点钟奖励统计',
          },
          children: [
            {
              hidden: true,
              path: "/rewardStatistics",
              name: "rewardStatistics",
              component: resolve => require(["@/views/financialManagement/rewardStatistics"], resolve),
              meta: {
                title: "点钟奖励设置",
                activeMenu: "/techAward"
              }
            },
          ]
        },
        {
          path: '/storeCommissionList',
          name: 'storeCommissionList',
          component: resolve => require(['@/views/financialManagement/storeCommissionList'], resolve),
          meta: {
            activeMenu: '/storeCommissionList',
            title: '店长提成列表',
          },
          children: [
            {
              hidden: true,
              path: "/storesCut",
              name: "storesCut",
              component: resolve => require(["@/views/financialManagement/storesCut"], resolve),
              meta: {
                title: "店长提成配置",
                activeMenu: "/storeCommissionList"
              }
            },
          ]
        },
        {
          path: '/receptionstoreCommissionList',
          name: 'receptionstoreCommissionList',
          component: resolve => require(['@/views/financialManagement/receptionstoreCommissionList'], resolve),
          meta: {
            activeMenu: '/receptionstoreCommissionList',
            title: '前台提成列表',
          },
          children: [
            {
              hidden: true,
              path: "/receptionist",
              name: "receptionist",
              component: resolve => require(["@/views/financialManagement/receptionist"], resolve),
              meta: {
                title: "前台提成配置",
                activeMenu: "/receptionstoreCommissionList"
              }
            },
          ]
        },
        {
          path: '/techCommissionList',
          name: 'techCommissionList',
          component: resolve => require(['@/views/financialManagement/techCommissionList'], resolve),
          meta: {
            activeMenu: '/techCommissionList',
            title: '技师提成列表(月汇总)',
          },
          children: [
            {
              hidden: true,
              path: "/techniciansCommission",
              name: "techniciansCommission",
              component: resolve => require(["@/views/financialManagement/techniciansCommission"], resolve),
              meta: {
                title: "技师提成配置",
                activeMenu: "/techCommissionList"
              }
            },
            {
              hidden: true,
              path: "/techniciansCommissionDetails",
              name: "techniciansCommissionDetails",
              component: resolve => require(["@/views/financialManagement/techniciansCommissionDetails"], resolve),
              meta: {
                title: "技师业绩明细表",
                activeMenu: "/techCommissionList"
              }
            },

            {
              hidden: true,
              path: "/technicianSurfaceDay",
              name: "technicianSurfaceDay",
              component: resolve => require(["@/views/financialManagement/technicianSurfaceDay"], resolve),
              meta: {
                title: "技师提成列表(日汇总)",
                activeMenu: "/techCommissionList"
              }
            },
            {
              hidden: true,
              path: "/technicianSurfaceInfo",
              name: "techniciPanSurfaceInfo",
              component: resolve => require(["@/views/financialManagement/technicianSurfaceInfo"], resolve),
              meta: {
                title: "技师提成(每笔汇总)",
                activeMenu: "/techCommissionList"
              }
            },
          ]
        },

      ]
    },
    {
      path: "/salaryCardList/salaryCardList",
      redirect: "/salaryCardList",
      component: resolve => require(['@/views/financialManagement/index'], resolve),
      meta: {
        activeMenu: "/commissionindex",
        title: "薪资管理"
      },
      children: [
        {
          path: '/salaryCardList',
          name: 'salaryCardList',
          component: resolve => require(['@/views/financialManagement/salaryCardList'], resolve),
          meta: {
            activeMenu: '/salaryCardList',
            title: '薪资单类别列表',
          },
          children: [
            {
              hidden: true,
              path: "/salaryCardDetails",
              name: "salaryCardDetails",
              component: resolve => require(["@/views/financialManagement/salaryCardDetails"], resolve),
              meta: {
                title: "",
                activeMenu: "/salaryCardList"
              }
            }
          ]
        },
        {
          path: '/salaryList',
          name: 'salaryList',
          component: resolve => require(['@/views/financialManagement/salaryList'], resolve),
          meta: {
            activeMenu: '/salaryList',
            title: '薪资列表',
          },
          children: [
            {
              hidden: true,
              path: "/salaryInfo",
              name: "salaryInfo",
              component: resolve => require(["@/views/financialManagement/salaryInfo"], resolve),
              meta: {
                title: "薪资详情",
                activeMenu: "/salaryList"
              }
            }
          ]
        },
      ]
    },
    {
      path: "/commissionReviewList/commissionReviewList",
      redirect: "/commissionReviewList",
      component: resolve => require(['@/views/financialManagement/index'], resolve),
      meta: {
        activeMenu: "/commissionindex",
        title: "审批管理"
      },
      children: [
        {
          path: '/commissionReviewList',
          name: 'commissionReviewList',
          component: resolve => require(['@/views/financialManagement/commissionReviewList'], resolve),
          meta: {
            activeMenu: '/commissionReviewList',
            title: '提成审核列表',
          },
          children: [
            {
              hidden: true,
              path: "/commissionReviewDetails",
              name: "commissionReviewDetails",
              component: resolve => require(["@/views/financialManagement/commissionReviewDetails"], resolve),
              meta: {
                title: "",
                activeMenu: "/commissionReviewList"
              }
            }
          ]
        },
        {
          path: '/withdrawalList',
          name: 'withdrawalList',
          component: resolve => require(['@/views/financialManagement/withdrawalList'], resolve),
          meta: {
            activeMenu: '/withdrawalList',
            title: '提现列表',
          }
        },
      ]
    },
    // {
    // 	path: '/basicSalary',
    // 	name: 'basicSalary',
    // 	component:resolve=>require(['@/views/financialManagement/basicSalary'],resolve),
    // 	meta: {
    // 		activeMenu: '/basicSalary',
    // 		title: '底薪管理',
    // 	}
    // },
    // {
    // 	path: '/commissionCalculation',
    // 	name: 'commissionCalculation',
    // 	component:resolve=>require(['@/views/financialManagement/commissionCalculation'],resolve),
    // 	meta: {
    // 		activeMenu: '/commissionCalculation',
    // 		title: '提成计算',
    // 	}
    // },
    // {
    // 	path: '/royaltyTemplate',
    // 	name: 'royaltyTemplate',
    // 	component:resolve=>require(['@/views/financialManagement/royaltyTemplate'],resolve),
    // 	meta: {
    // 		activeMenu: '/royaltyTemplate',
    // 		title: '提成模板',
    // 	}
    // },
    {
      path: '/refundManagement',
      name: 'refundManagement',
      component: resolve => require(['@/views/financialManagement/refundManagement'], resolve),
      meta: {
        activeMenu: '/refundManagement',
        title: '退款列表',
      }
    },
    // {
    // 	path: '/cashierCheck',
    // 	name: 'cashierCheck',
    // 	component:resolve=>require(['@/views/financialManagement/cashierCheck'],resolve),
    // 	meta: {
    // 		activeMenu: '/cashierCheck',
    // 		title: '收银结账',
    // 	}
    // },
    {
      path: "/invoiceList",
      name: "invoiceList",
      component: resolve => require(["@/views/financialManagement/invoiceList"], resolve),
      meta: {
        activeMenu: "/invoiceList",
        title: "开票列表"
      },
      children: [
        {
          hidden: true,
          path: "/invoiceDetails",
          name: "invoiceDetails",
          component: resolve =>
            require(["@/views/financialManagement/invoiceDetails"], resolve),
          meta: {
            title: "发票详情",
            activeMenu: "/invoiceList"
          }
        }
      ]
    },
    {
      path: "/companyList",
      name: "companyList",
      component: resolve => require(["@/views/financialManagement/companyList"], resolve),
      meta: {
        activeMenu: "/companyList",
        title: "开票公司管理"
      },
      children: [
        {
          hidden: true,
          path: "/editCompany",
          name: "editCompany",
          component: resolve =>
            require(["@/views/financialManagement/editCompany"], resolve),
          meta: {
            title: "新增/编辑/查看开票公司",
            activeMenu: "/companyList"
          }
        }
      ]
    }
  ]
},
//会员管理
{
  path: "/member/member",
  component: Layout,
  redirect: "/member",
  meta: {
    title: "会员管理",
    icon: "icon-huiyuanguanli-copy"
  },
  children: [{
    path: "/member",
    name: "member",
    component: resolve => require(["@/views/member/member"], resolve),
    meta: {
      activeMenu: "/member",
      title: "会员列表"
    },
    children: [
      {
        hidden: true,
        path: "/memberInfo",
        name: "memberInfo",
        component: resolve =>
          require(["@/views/member/memberInfo"], resolve),
        meta: {
          title: "商品详情",
          activeMenu: "/member"
        }
      },
      {
        hidden: true,
        path: "/memberMakeInvoice",
        name: "memberMakeInvoice",
        component: resolve =>
          require(["@/views/member/makeInvoice"], resolve),
        meta: {
          title: "申请开票",
          activeMenu: "/member"
        }
      },

    ]
  }, {
    path: "/memberFeedback",
    name: "memberFeedback",
    component: resolve => require(["@/views/member/memberFeedback"], resolve),
    meta: {
      activeMenu: "/memberFeedback",
      title: "用户反馈"
    },
    children: [
      {
        hidden: true,
        path: "/memberFeedbackInfo",
        name: "memberFeedbackInfo",
        component: resolve =>
          require(["@/views/member/memberFeedbackInfo"], resolve),
        meta: {
          title: "用户反馈详情",
          activeMenu: "/member"
        }
      }
    ]
  }, {
    path: "/cardRecords",
    name: "cardRecords",
    component: resolve => require(["@/views/member/cardRecords"], resolve),
    meta: {
      activeMenu: "/cardRecords",
      title: "退卡记录"
    }
  }
  ]
},
{
  path: "/couponManagement/couponGroupList",
  component: Layout,
  redirect: "/couponGroupList",
  meta: {
    title: "优惠券管理",
    icon: "icon-youhuiquan"
  },
  children: [
    {
      path: "/couponGroupList",
      name: "couponGroupList",
      component: resolve => require(["@/views/couponManagement/couponGroupList"], resolve),
      meta: {
        activeMenu: "/couponGroupList",
        title: "优惠券分组列表"
      },
      children: [
        {
          hidden: true,
          path: "/editCoupon",
          name: "editCoupon",
          component: resolve =>
            require(["@/views/couponManagement/editCoupon"], resolve),
          meta: {
            title: "",
            activeMenu: "/couponGroupList"
          }
        },
        {
          hidden: true,
          path: "/details",
          name: "details",
          component: resolve =>
            require(["@/views/couponManagement/details"], resolve),
          meta: {
            title: "",
            activeMenu: "/couponGroupList"
          }
        },
        {
          hidden: true,
          path: "/addCoupon",
          name: "addCoupon",
          component: resolve =>
            require(["@/views/couponManagement/addCoupon"], resolve),
          meta: {
            title: "",
            activeMenu: "/couponGroupList"
          }
        }
      ]
    },
    {
      path: "/couponList",
      name: "couponList",
      component: resolve => require(["@/views/couponManagement/couponList"], resolve),
      meta: {
        activeMenu: "/couponList",
        title: "优惠券列表"
      },
      children: [
        {
          hidden: true,
          path: "/lookDetails",
          name: "lookDetails",
          component: resolve =>
            require(["@/views/couponManagement/lookDetails"], resolve),
          meta: {
            title: "",
            activeMenu: "/couponList"
          }
        }
      ]
    },
    {
      path: "/usageRecord",
      name: "usageRecord",
      component: resolve => require(["@/views/couponManagement/usageRecord"], resolve),
      meta: {
        activeMenu: "/usageRecord",
        title: "优惠券使用记录"
      },
    }
  ]
},
//门店管理
{
  path: "/shopManagment/shopList",
  component: Layout,
  redirect: "/shopList",
  meta: {
    title: "门店管理",
    icon: "icon-mendianguanli"
  },
  children: [
    {
      path: "/shopList",
      name: "shopList",
      component: resolve => require(["@/views/shopManagment/shopList"], resolve),
      meta: {
        activeMenu: "/shopList",
        title: "门店列表"
      },
      children: [
        {
          hidden: true,
          path: "/editShop",
          name: "editShop",
          component: resolve => require(["@/views/shopManagment/editShop"], resolve),
          meta: {
            title: "商品详情",
            activeMenu: "/shopList"
          }
        }, {
          hidden: true,
          path: "/freeofcharge",
          name: "freeofcharge",
          component: resolve => require(["@/views/shopManagment/freeofcharge"], resolve),
          meta: {
            activeMenu: "/shopList",
            title: "免单人列表"
          },
        }
      ]
    },
    {
      path: "/shopClassify",
      name: "shopClassify",
      component: resolve => require(["@/views/shopManagment/shopClassify"], resolve),
      meta: {
        activeMenu: "/shopClassify",
        title: "门店分类"
      },
      children: [
        
      ]
    },
  ]
},
//评论标签管理
{
  path: "/labelManagement/labeList",
  component: Layout,
  redirect: "/labeList",
  meta: {
    title: "评论标签管理",
    icon: "icon-pinglunguanli"
  },
  children: [
    {
      path: "/labeList",
      name: "labeList",
      component: resolve => require(["@/views/labelManagement/labeList"], resolve),
      meta: {
        activeMenu: "/labeList",
        title: "评论标签管理"
      },
    }
  ]
},
//营销管理
{
  path: "/marketingManagement/shareShopList",
  component: Layout,
  redirect: "/shareShopList",
  meta: {
    title: "营销管理",
    icon: "icon-yingxiaoguanli1"
  },
  children: [
    {
      path: "/shareShopList",
      name: "shareShopList",
      component: resolve => require(["@/views/marketingManagement/shareShopList"], resolve),
      meta: {
        activeMenu: "/shareShopList",
        title: "分享商品列表"
      },
      children: [
        {
          hidden: true,
          path: "/editShareShopList",
          name: "editShareShopList",
          component: resolve => require(["@/views/marketingManagement/editShareShopList"], resolve),
          meta: {
            title: "分享商品详情",
            activeMenu: "/shareShopList"
          }
        }
      ]
    },
    {
      path: "/integral",
      name: "integral",
      component: resolve => require(["@/views/marketingManagement/integral"], resolve),
      meta: {
        activeMenu: "/integral",
        title: "分享商品积分列表"
      },
      children: [
        {
          hidden: true,
          path: "/editIntegral",
          name: "editIntegral",
          component: resolve => require(["@/views/marketingManagement/editIntegral"], resolve),
          meta: {
            title: "编辑分享比列",
            activeMenu: "/integral"
          }

        }
      ]
    },
    {
      path: "/shareProjectList",
      name: "shareProjectList",
      component: resolve => require(["@/views/marketingManagement/shareProjectList"], resolve),
      meta: {
        activeMenu: "/shareProjectList",
        title: "分享项目列表"
      },
      children: [
        {
          hidden: true,
          path: "/editProject",
          name: "editProject",
          component: resolve => require(["@/views/marketingManagement/editProject"], resolve),
          meta: {
            title: "分享项目详情",
            activeMenu: "/shareProjectList"
          }
        }
      ]
    },
    {
      path: "/shareProjectIntegral",
      name: "shareProjectIntegral",
      component: resolve => require(["@/views/marketingManagement/shareProjectIntegral"], resolve),
      meta: {
        activeMenu: "/shareProjectIntegral",
        title: "分享项目积分列表"
      },
      children: [
        {
          hidden: true,
          path: "/editProjectIntegral",
          name: "editProjectIntegral",
          component: resolve => require(["@/views/marketingManagement/editProjectIntegral"], resolve),
          meta: {
            title: "编辑分享比列",
            activeMenu: "/editProjectIntegral"
          }

        }
      ]
    },
  ]
},
//评论标签管理
{
  path: "/vipManagement/vipList",
  component: Layout,
  redirect: "/vipList",
  meta: {
    title: "会员卡管理",
    icon: "el-icon-postcard"
  },
  children: [
    {
      path: "/vipList",
      name: "vipList",
      component: resolve => require(["@/views/vipManagement/vipList"], resolve),
      meta: {
        activeMenu: "/vipList",
        title: "会员卡列表"
      },
      children: [
        {
          hidden: true,
          path: "/editVip",
          name: "editVip",
          component: resolve => require(["@/views/vipManagement/editVip"], resolve),
          meta: {
            title: "会员卡编辑",
            activeMenu: "/vipList"
          }

        }
      ]
    }
  ]
},
{
  path: "/reasonManagement/reasonList",
  component: Layout,
  redirect: "/reasonList",
  meta: {
    title: "取消原因管理",
    icon: "icon-bohuiyuanyinguanli"
  },
  children: [
    {
      path: "/reasonList",
      name: "reasonList",
      component: resolve => require(["@/views/reasonManagement/reasonList"], resolve),
      meta: {
        activeMenu: "/reasonList",
        title: "取消原因列表"
      },
      children: [
        {
          hidden: true,
          path: "/addReson",
          name: "addReson",
          component: resolve => require(["@/views/reasonManagement/addReson"], resolve),
          meta: {
            title: "新增原因",
            activeMenu: "/reasonList"
          }

        }
      ]
    }
  ]
},
{
  path: "/emotionAnalyze/itemAnalyse",
  component: Layout,
  redirect: "/itemAnalyse",
  meta: {
    title: "客情分析",
    icon: "el-icon-user"
  },
  children: [
    {
      path: "/itemAnalyse",
      name: "itemAnalyse",
      component: resolve => require(["@/views/emotionAnalyze/itemAnalyse"], resolve),
      meta: {
        activeMenu: "/itemAnalyse",
        title: "项目分析"
      },
    },
    {
      path: "/storesAnalysis",
      name: "storesAnalysis",
      component: resolve => require(["@/views/emotionAnalyze/storesAnalysis"], resolve),
      meta: {
        activeMenu: "/storesAnalysis",
        title: "门店分析"
      },
    },
    {
      path: "/satisfaction",
      name: "satisfaction",
      component: resolve => require(["@/views/emotionAnalyze/satisfaction"], resolve),
      meta: {
        activeMenu: "/satisfaction",
        title: "客户满意度分析"
      },
    },
    {
      path: "/userAnalyse",
      name: "userAnalyse",
      component: resolve => require(["@/views/emotionAnalyze/userAnalyse"], resolve),
      meta: {
        activeMenu: "/userAnalyse",
        title: "用户分析"
      },
    },
    {
      path: "/memberAnalysis",
      name: "memberAnalysis",
      component: resolve => require(["@/views/emotionAnalyze/memberAnalysis"], resolve),
      meta: {
        activeMenu: "/memberAnalysis",
        title: "会员分析"
      },
    },

  ]
},
{
  path: '/accountManagement/accountList',
  component: Layout,
  redirect: '/accountList',
  meta: {
    title: '权限管理',
    icon: 'icon-quanxianguanli',
  },
  children: [
    {
      path: '/accountList',
      name: 'accountList',
      component: () => import('@/views/accountManagement/accountList'),
      meta: {
        title: '管理员列表',
        activeMenu: '/accountList'
      },
      children: [{
        hidden: true,
        path: '/accountbution',
        name: 'RootDdistribution',
        component: () => import('@/views/accountManagement/rootDdistribution'),
        meta: {
          title: '权限分配',
          activeMenu: '/accountList'
        }
      }, {
        hidden: true,
        path: '/accountDetail',
        name: 'accountDetail',
        component: () => import('@/views/accountManagement/accountDetail'),
        meta: {
          title: '详情',
          activeMenu: '/accountList'
        }
      },
      {
        hidden: true,
        path: '/addAccount',
        name: 'addAccount',
        component: () => import('@/views/accountManagement/addAccount'),
        meta: {
          title: '新增',
          activeMenu: '/accountList'
        }
      },
      {
        hidden: true,
        path: '/editAccount',
        name: 'editAccount',
        component: () => import('@/views/accountManagement/editAccount'),
        meta: {
          title: '编辑',
          activeMenu: '/accountList'
        }
      }]
    },
    {
      // hidden: true,
      path: '/roleList',
      name: 'roleList',
      component: () => import('@/views/accountManagement/roleList'),
      meta: {
        title: '角色列表',
        activeMenu: '/roleList'
      },
      children: [
        {
          hidden: true,
          path: '/roleDetail',
          name: 'roleDetail',
          component: () => import('@/views/accountManagement/roleDetail'),
          meta: {
            title: '详情',
            activeMenu: '/roleList'
          }
        },
        {
          hidden: true,
          path: '/rootDdistribution',
          name: 'RootDdistribution',
          component: () => import('@/views/accountManagement/rootDdistribution'),
          meta: {
            title: '权限分配',
            activeMenu: '/roleList'
          }
        }
      ]
    },
    {
      path: "/menuLists",
      name: "menuLists",
      component: resolve => require(["@/views/menuLists/menuLists"], resolve),
      meta: {
        activeMenu: "/menuLists",
        title: "菜单管理"
      }
    },
  ]
},




{
  path: '*',
  redirect: '/404',
  meta: { isNo: true },
  hidden: true
}
]

export const asyncRoutes = [

  // 404 page must be placed at the end !!!

]
const createRouter = () => new Router({
  // mode: 'history', // require service support
  scrollBehavior: () => ({
    y: 0
  }),
  routes: constantRoutes
})

const router = createRouter()
router.asyncRoutes = asyncRoutes;
router.constantRoutes = constantRoutes;
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() {
  const newRouter = createRouter()
  router.matcher = newRouter.matcher // reset router
}

export default router
